<template>
  <van-tabs
    v-model:active="active"
    color="#72C7C6"
    :lazy-render="false"
    title-active-color="#72C7C6"
  >
    <van-tab title="全部" to="/searcha/all" name="/searcha/all"></van-tab>
    <van-tab title="文章" to="/searcha/essay" name="/searcha/essay"></van-tab>
    <van-tab title="讨论" to="/searcha/discus" name="/searcha/discus"></van-tab>
    <van-tab title="产品" to="/searcha/prod" name="/searcha/prod"></van-tab>
    <van-tab title="成分" to="/searcha/elem" name="/searcha/elem"></van-tab>
  </van-tabs>
</template>

<script>
import { ref } from "vue";
export default {
  setup() {
    const active = ref(location.hash.slice(1));
    return { active };
  },
};
</script>

<style lang="less" scoped>
.van-tabs--line {
  border-bottom: 1px solid #eee;
  border-top: 1px solid #eee;
}
</style>
